home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Symbols
/
s-subtract-range
< prev
next >
Wrap
Lisp/Scheme
|
1998-08-11
|
508b
|
22 lines
s-subtract-range range pattern
0-based
This function subtracts items within a given range and the output is returned.
(setq sym1 (g-cluster .23 's 0 0 0 7))
(setq sym2 (g-cluster .23 's 0 0 '(0 1 3 6) '(6 7 8 6)))
(s-subtract-range '(3 5) sym1)
=> (a b c f g)
(setq range
(pick-rnd1 .23 :content 2
(g-integer 0 (l-count :all :content sym2))))
=> ((2 6) (1 6) (0 5) (5 2))
internally to: ((2 6) (1 6) (0 5) (2 5))
(s-subtract-range range sym2)
=> ((a b) (b h) (i j k) (g h l))